<%inherit file="/dashboard/site.mako" />
<%def name="title()">Dashboard - Upload de fichier</%def>
<div id="upload_div">
	<div id="file_list">
		<ul><p style="color: grey; font-weight: bold; font-size: 14px;">Liste des fichiers</p>
			%if len(c.files) > -1 :
			%    for file in c.files:
			%        if file != '.svn':

			<li><a class="copy_link" href="#">copier lien</a> - <a  target="_blank" href="/upload/${file}">${file}</a> - <a href="/dashboard/upload/delete/${file}" onclick="user_confirm();">Supprimer</a></li>
			<div id="s_l_${file}" style="display: none;">
			<p>/upload/${file}</p>
			<p>http://compagnie-chrysalide.com/upload/${file}</p>
			</div>
			
			%        endif  
			%    endfor
			%else:
			    Aucun Fichier
			%endif
		</ul>
	</div>
	<div id="upload_file">
		%if request.params.get('upload') == 'success':
			<p style="color: green;">Fichier correctement uploadé</p>
		%elif request.params.get('upload') == 'failed':
			<p style="color: red">Erreur lors de l'envoye du fichier</p>
		%endif

		%if request.params.get('delete') == 'success':
			<p style="color: green;">Fichier correctement supprimé</p>
		%elif request.params.get('delete') == 'failed':
			<p style="color: red;">Erreur lors de la suppression du fichier</p>
		%endif	
		
		<p style="color: grey; font-weight: bold; font-size: 14px;">Importer un fichier:</p>
		<form action="/dashboard/upload_submit" method="POST" id="upload_form" enctype="multipart/form-data">
			<p><input type="file" name="myfile" id="myfile" /></p>
			<p><input type="submit" name="submit" value="Uploader" /></p>
			
		</form>
		 
	</div>
	
	<div style="clear: both;"></div>
</div>